package com.study.classtest;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class WorkTest {
    public static void main(String[] args){
        int sales=1000;
        int overtime=9;
        int days=26;
        int time=8;
        double countOverMoney = 0;

        double hoursale=sales/time/days;


        System.out.println(hoursale);
        if(0<overtime&&overtime<10){
            countOverMoney=overtime*hoursale*1.5;
        }else if(overtime>10){
            countOverMoney=4*overtime;
        }
        System.out.println(countOverMoney);


        Double a = 1.0;
        Double b = 3.0;
        BigDecimal bi1 = new BigDecimal(a.toString());
        BigDecimal bi2 = new BigDecimal(b.toString());
        BigDecimal divide = bi1.divide(bi2, 2, RoundingMode.HALF_UP);
        double ddddd=divide.doubleValue();
        System.out.println(ddddd);
    }
}
